const http = require("http");
const fs = require("fs");
const path = require("path");

http.createServer((req , res) => {
    let filePath = path.join(__dirname , "data.txt");
    let fileReader = fs.createReadStream(filePath);

    fileReader.pipe(res);
}).listen(8081);

console.log("server is listening 8081");